<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %>
<%@ include file="/common/taglibs.jsp"%>
<c:if test="${pageContext.request.remoteUser ne null}">
	<c:redirect url="/mainMenu.html"/>
</c:if>
	
	<title>
		欢迎光临 Rollbook - 登录、注册或了解更多
	</title>
	<meta name="menu" content="Login"/>
	<script type="text/javascript" src="${ctx }/scripts/plugins/date/dateSelector.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			$("#regForm").validationEngine();
<%--			if($("#year").val() == ""){--%>
<%--				$("#month").attr("disabled","disabled");--%>
<%--				$("#date").attr("disabled","disabled");--%>
<%--			}else if($("#month").val() == ""){--%>
<%--				$("#date").attr("disabled","disabled");--%>
<%--			}--%>
		});
	</script>
	<div class="login_bg">
		<div class="container_16">
			<div class="grid_10" align="left">
				<p align="left" style="margin-top: 20px;">
					<h4>提高碎片化时间的价值，开启个人时间管理的新篇章！</h4>
				</p>
				<div class="welcome_pic"></div>
			</div>
			<div class="grid_6" align="right">
				<div class="reg_top">
					<h6>注册<br><span>完全并永久免费</span></h6>
				</div>
				<hr>
				<div class="reg_middle">
					<form id="regForm" action="${ctx }/saveSignup.html" method="post">
						<table cellpadding="0" cellspacing="0" style="margin-left: 10px; width: 300px;">
							<tr>
								<td>
									<label>电子邮箱：</label>
								</td>
								<td>
									<input class="validate[required,custom[email]] input" type="text" id="username" name="user.username" />
								</td>	
							</tr>
							<tr>
								<td>
									<label>姓名：</label>
								</td>
								<td>
									<input class="validate[required] input" type="text" id="displayName" name="user.displayName" />
								</td>	
							</tr>
							<tr>
								<td>
									<label>密码：</label>
								</td>
								<td>
									<input class="validate[required] input" type="password" id="password" name="user.password" />
								</td>	
							</tr>
							<tr>
								<td>
									<label>确认密码：</label>
								</td>
								<td>
									<input class="validate[required,equals[password]] input" type="password" id="confirmPassword" name="confirmPassword" />
								</td>	
							</tr>
							<tr>
								<td>
									<label>性别：</label>
								</td>
								<td>
									<select class="validate[required] input_100" id="gender" name="user.gender">
										<option value="">
											请选择
										</option>
										<option value="1">
											男
										</option>
										<option value="2">
											女
										</option>
									</select>
								</td>	
							</tr>
							<tr>
								<td>
									<label>生日：</label>
								</td>
								<td>
									<select id="year" name="userInfo.birthYear" class="validate[required] input_60"></select>
									<select id="month" name="userInfo.birthMonth" class="validate[required] input_60"></select>
									<select id="date" name="userInfo.birthDay" class="validate[required] input_60"></select>
								</td>	
							</tr>
							<tr>
								<td>
									&nbsp;
								</td>
								<td>
									<label class="btn"><input id="signup" name="signup" type="submit" value="注册" /></label>
								</td>	
							</tr>
						</table>
					</form>	
				</div>
				<div class="reg_bottom">
					<hr>
					<div class="group_reg">
						团体或企业
						<span><a target="_blank" href="${ctx }/signup.html?actionType=1">注册</a></span>
					</div>
				</div>
			</div>		
		</div>
	</div>

	<script type="text/javascript">
		new DateSelector('year', 'month', 'date', {floorYear: 120}).init();
	</script>
